package cn.uniqueinfo.dp.vo;

import lombok.Data;

/**
 * @author:朱元勋
 * @mail:395910063@qq.com
 * @date:2019-01-14 15:16:44
 * @description: 业务表单列表字段配置
 */
@Data
public class FormListVO extends BaseVO {
    /**对应业务表单id*/
    private Long formId;
    /**表名*/
    private String tableName;
    /**字段名*/
    private String fieldName;
    /**字段别名*/
    private String fieldLabel;
    /**字段类型*/
    private String fieldType;
    /**标题*/
    private String fieldTitle;
    /**宽度0=不限制*/
    private Integer fieldTitleWidth;
    /**表单颜色*/
    private String fieldTitleColor;
    /**对齐方式*/
    private String fieldTitleAlign;
    /**字段栏对齐方式left,center,right*/
    private String fieldColumnAlign;
    /**显示顺序*/
    private Integer fieldShowIndex;
    /**是否支持排序0=不支持1=支持*/
    private Integer isOrder;
    /**是否支持拖动0=不支持1=支持*/
    private Integer isDrag;
    /**是否参与查询0=不参与1=参与*/
    private Integer isQuery;
    /**是否参与查询排序0=不参与1=参与*/
    private Integer isQuerySort;
    /**order顺序*/
    private Integer isQuerySortIndex;
    /**查询排序方式,asc=正序,desc=倒叙*/
    private String isQuerySortType;
    /**是否显示0=不显示1=显示*/
    private Integer isShow;
    /**是否冻结0=不冻结1=冻结*/
    private Integer isFreeze;
    /**是否汇总0=不汇总1=要汇总*/
    private Integer isCollect;
    /**是否穿透0=不穿透1=可穿透*/
    private Integer isStrike;
    /**穿透链接*/
    private String strikeLink;
    /**字段显示权限，0=不设置权限，其他为角色id如1,4,10*/
    private String authRole;
    /**备注*/
    private String comment;

    private String options;

    public String getOptions() {
        return "field:'"+this.getFieldLabel()+"',width:"+(this.getFieldTitleWidth()>0?this.getFieldTitleWidth():40)+",align:'"+this.getFieldTitleAlign()+"',halign:'"+this.getFieldColumnAlign()+"'"+
                ",sortable:"+(this.getIsOrder()==0?false:true)+",resizable:"+(this.getIsDrag()==0?false:true)+"";
    }
}
